package cn.shlbysj.demo.common;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * 分页结果查询结果
 */
@ApiModel(value="PageResult",description="分页对象实体")
public class PageResult implements Serializable{

    @ApiModelProperty(value="总记录数",name="total",required=false)
    private long total; //总记录数

    @ApiModelProperty(value="当前页结果",name="rows",required=false)
    private List rows;//当前页结果

    @ApiModelProperty(value="针对首页检索返回检索类型（1 图文 2 ppt 3 视频）",name="type",required=false)
    private String type;

    public PageResult(long total, List rows) {
        super();
        this.total = total;
        this.rows = rows;
    }
    public PageResult(long total, List rows,String type) {
        super();
        this.total = total;
        this.rows = rows;
        this.type = type;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List getRows() {
        return rows;
    }

    public void setRows(List rows) {
        this.rows = rows;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
